<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 *留言记录
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$tabs=array(
	array('op'=>'list','title'=>'申请列表'),
);
if($_RQ['op']=='list'){
	$type=intval($_RQ['type']);
	$params=array('merchid'=>$merchid,'uniacid'=>$_SESSION['uniacid']);
	if(!empty($_RQ['title'])){
		$jianliids=pdo_getall('jy_51job_jianli',array('uniacid'=>$_SESSION['uniacid'],'title like %'=>$_RQ['jobtitle'].'%'),'id','id');
		$jianliids=$jianliids?:-1;
		$params['itemid']=$jianliids;
		$return['params']['title']=$_RQ['title'];
	}
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$total='';
	$list=pdo_getslice('jy_51job_jianli_log',$params,array($pindex,$psize),$total,$fields,'','id desc');
	foreach($list as &$item){
		$item['member']=$this->model('member')->member_show($item['memberid']);
		$jianli=pdo_get('jy_51job_jianli',array('id'=>$item['jianliid'],'uniacid'=>$_SESSION['uniacid']));
		$item=array_merge($jianli,$item);
		$item['createtime']=date('Y-m-d H:i:s', $item['createtime']);
	}
	$return['list']=$list;
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	$htmls=array(
		'type'=>'list',
		'tabs'=>$tabs,
		'list'=>array('data'=>'list','edit'=>false,'delall'=>false,'delone'=>false,'list'=>array(
			array('name'=>'city','title'=>'城市','type'=>'string'),
			array('name'=>'name','title'=>'姓名','type'=>'string'),
			array('name'=>'sex','title'=>'性别','type'=>'radio','options'=>'sex'),
			array('name'=>'mobile','title'=>'电话','type'=>'string'),
			array('type'=>'radio','title'=>'学历','name'=>'xueli','help'=>'','options'=>'xueli'),
			array('name'=>'title','title'=>'职位意向','type'=>'string'),
			array('name'=>'age','title'=>'出生年份','type'=>'string'),
			array('name'=>'express','title'=>'工作经验','type'=>'string'),
			array('name'=>'address','title'=>'现居住地','type'=>'string'),
			array('name'=>'createtime','title'=>'时间','type'=>'string'),
			array('name'=>'status','title'=>'状态','type'=>'radio','options'=>'status'),
		),'action'=>array(
			array('title'=>'审核操作','type'=>'modal','op'=>'check','show'=>array('status'=>array(0,1,2))),
		)),
		'search'=>array(
			array('name'=>'city','width'=>10,'title'=>'城市','type'=>'string'),
			array('name'=>'name','width'=>10,'title'=>'姓名','type'=>'string'),
			array('name'=>'mobile','width'=>10,'title'=>'电话','type'=>'string'),
			array('name'=>'title','width'=>10,'title'=>'职位意向','type'=>'string'),
		)
	);
	if($_SESSION['os']=='windows'){
		$return['htmls']=$htmls;
	}
	exi($return);
}
